 package com.order.service.impl;
 
 import com.order.dao.goodsDao;
import com.order.po.b_color;
import com.order.po.goods;
import com.order.po.order_record;
import com.order.service.goodsService;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 @Service
 @Transactional
 public class goodsServiceImpl
   implements goodsService
 {
   @Autowired
   private goodsDao goodsDao;
   @Override
   public List<goods> select_Allgoods()
   {
     List<goods> good = this.goodsDao.select_Allgoods();
     return good;
   }

   @Override
   public List<goods> select_goods(goods g) {
	   // TODO Auto-generated method stub
	return  this.goodsDao.select_goods(g);
   }

	@Override
	public void update_goods(goods g) {
		// TODO Auto-generated method stub
		this.goodsDao.update_goods(g);
	}

	@Override
	public void insert_goods(goods g) {
		// TODO Auto-generated method stub
		goodsDao.insert_goods(g);
	}

	@Override
	public void delete_goods(int id, String goods_id) {
		// TODO Auto-generated method stub
		goodsDao.delete_goods(id, goods_id);
	}

	@Override
	public void insert_moregoods(List<goods> list) {
		// TODO Auto-generated method stub
		for(int i=0;i<list.size();i++) {
			goods o = list.get(i);
			goodsDao.insert_goods(o);
		}
	}

	@Override
	public List<goods> select_goodsstock(goods g) {
		// TODO Auto-generated method stub
		return  this.goodsDao.select_goodsstock(g);
	}

	@Override
	public void update_state(Integer parameter, Integer parameter1) {
		// TODO Auto-generated method stub
		goodsDao.update_state(parameter, parameter1);
	}
 }


